//汉化包   START   =================================================================
/**
 * Simplified Chinese translation for bootstrap-datetimepicker
 * Yuan Cheung <advanimal@gmail.com>
 */
;(function ($) {
    $.fn.datetimepicker.dates['zh-CN'] = {
        days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
        daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
        daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
        months: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
        monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一", "十二"],
        today: "今天",
        suffix: [],
        meridiem: ["上午", "下午"]
    };
}(jQuery));

!function (a) {
    "use strict";
    a.fn.bootstrapTable.locales["zh-CN"] = {
        formatLoadingMessage: function () {
            return "正在努力地加载数据中，请稍候……"
        }, formatRecordsPerPage: function (a) {
            return "每页显示条数：" + a + ""
        }, formatShowingRows: function (a, b, c) {
            return ""
        }, formatSearch: function () {
            return "搜索"
        }, formatNoMatches: function () {
            return "没有找到匹配的记录"
        }, formatPaginationSwitch: function () {
            return "隐藏/显示分页"
        }, formatRefresh: function () {
            return "刷新"
        }, formatToggle: function () {
            return "切换"
        }, formatColumns: function () {
            return "列"
        }, formatExport: function () {
            return "导出数据"
        }, formatClearFilters: function () {
            return "清空过滤"
        }
    }, a.extend(a.fn.bootstrapTable.defaults, a.fn.bootstrapTable.locales["zh-CN"])
}(jQuery);


/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */

(function () {
    if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd)var e = jQuery.fn.select2.amd;
    return e.define("select2/i18n/zh-CN", [], function () {
        return {
            errorLoading: function () {
                return "正在加载..."
            }, inputTooLong: function (e) {
                var t = e.input.length - e.maximum, n = "请删除" + t + "个字符";
                return n
            }, inputTooShort: function (e) {
                var t = e.minimum - e.input.length, n = "请再输入至少" + t + "个字符";
                return n
            }, loadingMore: function () {
                return "载入更多结果…"
            }, maximumSelected: function (e) {
                var t = "最多只能选择" + e.maximum + "个项目";
                return t
            }, noResults: function () {
                return "未找到结果"
            }, searching: function () {
                return "搜索中…"
            }
        }
    }), {define: e.define, require: e.require}
})();
//汉化包   END     =================================================================


jQuery.sysPlugin = {

    clearModalRemoveData: function (modalId) {
        var $modal = $("#" + modalId);
        $modal.on("hidden.bs.modal", function () {
            $modal.find(".modal-content").html("<div style='text-align: center'><div class='loadImage32' style='margin:0 auto'></div></div>");
            $modal.removeData("bs.modal");
        });
    },


    initSelect2: function ($select, obj) {
        var defObj = {
            multiple: false,
            minimumResultsForSearch: Infinity,
            width: '100%',
            placeholder: null,
            data: null,
            url: null,
            value: null
        };

        $.extend(defObj, obj);

        if (defObj.data == undefined) {
            defObj.data = [];
        } else if (!$.Helper.ValidateHelper.isArray(defObj.data)) { //defObj.data 如果是一个Object对象转换成Array对象
            var a = [];
            $.each(defObj.data, function (k, v) {
                a.push({id: k, text: v});
            });
            defObj.data = a;
        }


        //defObj.url存在时从远处获取数据
        if (defObj.url != undefined) {
            var $request = $.ajax({
                async:false,
                url: defObj.url
            });
            $request.then(function (data) {
                for (var i = 0; i < data.length; i++) {
                    defObj.data.push({id:  data[i].id, text:  data[i].text});
                }
            });
        }

        $select.select2(defObj);

        if (defObj.value != undefined && defObj.value != '') {
            $select.val(defObj.value).trigger('change');
        }

    },

    initSimpleSelect2: function () {
        $("select").select2({
            multiple: false,
            minimumResultsForSearch: Infinity,
            width: '100%',
        })
    },

    initDateTimeInput: function () {
        $('.timeInput').datetimepicker({
            language: 'zh-CN',
            format: 'yyyy-mm-dd',
            weekStart: 1,
            todayBtn: 1,
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            minView: 2,
            todayHighlight: true,
            forceParse: 0
        }).on("changeDate", function (ev) {
            try {
                var var_filed = $(this).find("input").attr("name");
                $(this).parents("form").bootstrapValidator('revalidateField', var_filed);
            } catch (e) {
            }
        })
    },

    ifElse: function (value, obj, elseValue) {
        var result = elseValue || "";
        for (var name in obj) {
            if (name == value) {
                result = obj[name];
                break;
            }
        }
        return result;
    },
    enumeration: {
        retire: {0: "在职", 1: "退休"},
        outLander: {0: "省内", 1: "省外"},
        boole: {0: "不是", 1: "是"},
        sex: {0: "女", 1: "男"},
        live: {0: "停用", 1: "启用"},
        operationType: {0: "添加", 1: "查询", 2: "修改", 3: "删除"},
        menuType: {0: "菜单", 1: "按钮"},
        education: {0: "博士", 1: "博士研究生", 2: "硕士", 3: "硕士研究生", 4: "本科", 5: "大专", 6: "中专", 7: "高中"},
        expertType: {0: "审查员", 1: "高级审查员", 2: "高级评审员", 3: "评审员"},
        rank: {0: "正高", 1: "副高", 2: "中级", 3: "其他"},
        belongTo: {0: "企业库", 1: "专家库", 2: "员工库"},
        leaderCrew: {0: "组员", 1: "组长"},
        companyProperty: {0: "企业", 1: "机关", 2: "事业单位", 3: "社会团体", 4: "其他"},
        expertGrade: {AA: "AA", A: "A", B: "B", C: "C"},
        signState: {0: "未到", 1: "到"}
    },
    //创建弹框字符串
    createAlert: function (message) {
        return '<div  class="alert alert-danger alert-dismissible " role="alert" >' +
            '<button type="button" class="close" data-dismiss="alert">' +
            '<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>' +
            '</button>' +
            '<label>' + message + '</label>' +
            '</div>';
    },
    superAjax: function (var_arg) {

        if (var_arg.operateType == 'insert') {
            var_arg.operateType = '添加'
        } else if (var_arg.operateType == 'update') {
            var_arg.operateType = '修改';
        } else if (var_arg.operateType == 'delete') {
            var_arg.operateType = '删除';
        } else if (var_arg.operateType == 'other' || var_arg.operateType == undefined) {
            var_arg.operateType = '操作';
        }

        var arg = {
            url: '#',
            data: {},
            type: 'POST',
            contentFile: false,
            showSuccessAlert: true,
            showWarnAlert: true,
            errorAddressId: 'div_error',
            successTitle: var_arg.operateType + "成功！",
            errorTitle: var_arg.operateType + "失败！",
            warnTitle: "确定" + var_arg.operateType + "？",
            successCall: function (data) {
            },
            errorCall: function (data) {
            },
            completeCall: function (data) {

            }, warnAlertCancelCall: function () {

            }
        };

        jQuery.extend(arg, var_arg);
        arg.data._RID = new Date().getTime();

        var i = {
            type: arg.type,
            data: arg.data,
            url: arg.url,
            headers: {_superAjax: true},
            success: function (data) {
                if (typeof data.status == undefined) {
                    window.document.write(data);
                }
                if (data.status == '1') {
                    if (arg.showSuccessAlert) {
                        swal({
                            title: arg.successTitle,
                            type: "success",
                            showConfirmButton: true,
                            confirmButtonText: '确定'
                        }, function () {
                            arg.successCall(data);
                        });
                    } else {
                        arg.successCall(data);
                    }
                } else {
                    if (arg.showWarnAlert) {
                        swal({
                            title: arg.errorTitle,
                            type: "error",
                            text: data.message,
                            html: true,
                            showConfirmButton: true,
                            confirmButtonText: '确定'
                        }, function () {
                            arg.errorCall(data);
                        });
                    } else {
                        var $divError = $("#" + arg.errorAddressId);
                        if ($divError.length == 0) {
                            swal({
                                title: arg.errorTitle,
                                type: "error",
                                text: data.message,
                                html: true,
                                showConfirmButton: true,
                                confirmButtonText: '确定'
                            });
                        } else {
                            $divError.html($.sysPlugin.createAlert(data.message));
                        }

                        arg.errorCall(data);
                    }
                }
            },
            error: function () {
                alert("系统异常.....");
            },
            complete: function (data) {
                arg.completeCall(data);
            }
        };

        if (var_arg.contentFile == true) {
            i['contentType'] = false;
            i['processData'] = false;
        }
        if (arg.showWarnAlert) {
            swal({
                    title: arg.warnTitle,
                    type: "warning",
                    showCancelButton: true,
                    cancelButtonText: "取消",
                    confirmButtonColor: "#DD6B55",
                    confirmButtonText: '确定',
                    closeOnConfirm: false,
                    closeOnCancel: true,
                    showLoaderOnConfirm: true
                },
                function (isConfirm) {
                    if (isConfirm) {
                        $.ajax(i);
                    } else {
                        arg.warnAlertCancelCall();
                    }
                });
        } else {
            $.ajax(i);
        }
    },
    errorCallBack: function (data, arg) {

        //if (typeof arg.errorAddress) {
        //    arg.errorAddress.html($.sysPlugin.createAlert(data.message));
        //}

        if (typeof arg.form) {
            arg.form.data('bootstrapValidator').resetForm();
        }
    },
    successCallBack: function (data, arg) {
        if (typeof arg.modal != 'undefined') {
            arg.modal.modal('hide');
        }
        if (typeof arg.form != 'undefined') {
            arg.form.data('bootstrapValidator').resetForm();
        }

        if (typeof arg.table != 'undefined') {
            arg.table.bootstrapTable('refresh');
        }
        if (typeof arg.zTreeId != 'undefined') {
            var treeObj = $.fn.zTree.getZTreeObj(arg.zTreeId);
            if (treeObj.setting.async.enable == true) {
                treeObj.reAsyncChildNodes(null, "refresh");
            } else {
                treeObj.refresh();
            }

        }
        if (typeof arg.jsTree == 'function') {
            arg.jsTree();
        } else if (typeof arg.jsTree != 'undefined') {
            arg.jsTree.jstree('refresh');
        }


    }

};

(function ($) {
    $.fn.serializeObject = function () {
        var o = {};
        var a = this.serializeArray();
        $.each(a, function () {
            if (o[this.name] !== undefined) {
                if (!o[this.name].push) {
                    o[this.name] = [o[this.name]];
                }
                o[this.name].push(this.value || '');
            } else {
                o[this.name] = this.value || '';
            }
        });
        return o;
    };
})(jQuery);


//zTree 扩展 START
function ApmZTreeUtil(showInput, picker, render) {
    this.beforeClick = function (treeId, treeNode) {
        var zTree = $.fn.zTree.getZTreeObj(render.attr("id"));
        zTree.checkNode(treeNode, !treeNode.checked, true, true);
        return false;
    };
    this.onCheck = function (e, treeId, treeNode) {
        var zTree = $.fn.zTree.getZTreeObj(render.attr("id")),
            nodes = zTree.getCheckedNodes(true),
            v = "";
        for (var i = 0, l = nodes.length; i < l; i++) {
            v += nodes[i].name + ",";
        }
        if (v.length > 0) v = v.substring(0, v.length - 1);
        var cityObj = showInput;
        cityObj.attr("value", v);
    };
    this.showMenu = function () {
        picker.slideDown("fast");
        $("body").bind("mousedown", this.onBodyDown);
    };

    this.onBodyDown = function (event) {
        if (!( event.target == showInput || event.target == picker || $(event.target).parents("#" + picker.attr("id")).length > 0)) {
            picker.fadeOut("fast");
            $("body").unbind("mousedown", this.onBodyDown);
        }
    };
}

//<input type="text" readonly id="citySel1" class="form-control" name="permission">
//    <div id='menuContent1' style="display: none; position: relative; height: 0px;z-index: 100">
//    <div style="background-color: #f5f5f5;border: 1px solid #ccc">
//    <div style="overflow-y:auto; overflow-x:auto; max-height: 200px; ">
//    <ul id="treeDemo1" class="ztree"></ul>
//    </div>
//    </div>
//    </div>

//$(function () {
//    var selectTree = new ApmZTreeUtil(
//        $("#citySel1"),
//        $("#menuContent1"),
//        $("#treeDemo1")
//    ), setting = {
//        check: {
//            enable: true,
//            checkboxType: {"Y": "", "N": ""}
//        },
//        view: {
//            dblClickExpand: false
//        },
//        data: {
//            simpleData: {
//                enable: true
//            }
//        },
//        async: {
//            enable: true,
//            url:$("#id").val() == ''?"upms/permission/selectChildren":"upms/permission/selectByRoleId",
////                autoParam: ["id"],
//            otherParam:{"id":$("#id").val()},
////                dataFilter: filter
//        },
//        callback: {
//            beforeClick: selectTree.beforeClick,
//            onCheck: selectTree.onCheck
//        }
//    };
//    $("#citySel1").on('click', function () {
//        selectTree.showMenu();
//    });
//    $.fn.zTree.init($("#treeDemo1"), setting);
//});

//zTree 扩展 END


//======= 帮助类 START======
jQuery.Helper = {

    dataTimeHelper: {
        int2DateString: function (value) {
            if (value == undefined || value == "") {
                return "";
            }
            var dt = new Date(parseInt(value));
            var data = dt.getFullYear()
                + "-"
                + ((dt.getMonth() + 1) >= 10 ? (dt.getMonth() + 1) : "0"
                + (dt.getMonth() + 1))
                + "-"
                + (dt.getDate() < 10 ? "0" + dt.getDate() : dt.getDate());
            return data;
        },
        int2DateTimeString: function (value) {
            if (value == undefined || value == "") {
                return "";
            }
            var date = new Date(parseInt(value));
            var datetime = date.getFullYear()
                + "-"
                + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : "0"
                + (date.getMonth() + 1))
                + "-"
                + (date.getDate() < 10 ? "0" + date.getDate() : date
                    .getDate())
                + " "
                + (date.getHours() < 10 ? "0" + date.getHours() : date
                    .getHours())
                + ":"
                + (date.getMinutes() < 10 ? "0" + date.getMinutes() : date
                    .getMinutes())
                + ":"
                + (date.getSeconds() < 10 ? "0" + date.getSeconds() : date
                    .getSeconds());
            return datetime;
        }
    },


    /**
     * 表单帮助类，序列化、反序列化，设置值
     * @class BUI.FormHelper
     * @singleton
     */
    FormHelper: {
        /**
         * 将表单格式化成键值对形式
         * @param {HTMLElement} form 表单
         * @return {Object} 键值对的对象
         */
        serializeToObject: function (form) {
            var array = $(form).serializeArray(),
                result = {};
            $.each(array, function (item) {
                var name = item.name;
                if (!result[name]) { //如果是单个值，直接赋值
                    result[name] = item.value;
                } else { //多值使用数组
                    if (!$.Helper.ValidateHelper.isArray(result[name])) {
                        result[name] = [result[name]];
                    }
                    result[name].push(item.value);
                }
            });
            return result;
        },
        /**
         * 设置表单的值
         * @param {HTMLElement} form 表单
         * @param {Object} obj  键值对
         */
        setFields: function (form, obj) {
            for (var name in obj) {
                if (obj.hasOwnProperty(name)) {
                    $.Helper.FormHelper.setField(form, name, obj[name]);
                }
            }
        },
        /**
         * 清空表单
         * @param  {HTMLElement} form 表单元素
         */
        clear: function (form) {
            var elements = $.makeArray(form.elements);
            $.each(elements, function (element) {
                if (element.type === 'checkbox' || element.type === 'radio') {
                    $(element).attr('checked', false);
                } else {
                    $(element).val('');
                }
                $(element).change();
            });
        },
        /**
         * 设置表单字段
         * @param {HTMLElement} form 表单元素
         * @param {string} field 字段名
         * @param {string} value 字段值
         */
        setField: function (form, fieldName, value) {
            var fields = form.elements[fieldName];
            if (fields && fields.type) {
                $.Helper.FormHelper._setFieldValue(fields, value);
            } else if (BUI.isArray(fields) || (fields && fields.length)) {
                BUI.each(fields, function (field) {
                    $.Helper.FormHelper._setFieldValue(field, value);
                });
            }
        },
        //设置字段的值
        _setFieldValue: function (field, value) {
            if (field.type === 'checkbox') {
                if (field.value == '' + value || ($.Helper.ValidateHelper.isArray(value) && $.Helper.ArrayHelper.indexOf(field.value, value) !== -1)) {
                    $(field).attr('checked', true);
                } else {
                    $(field).attr('checked', false);
                }
            } else if (field.type === 'radio') {
                if (field.value == '' + value) {
                    $(field).attr('checked', true);
                } else {
                    $(field).attr('checked', false);
                }
            } else {
                $(field).val(value);
            }
        },
        /**
         * 获取表单字段值
         * @param {HTMLElement} form 表单元素
         * @param {string} field 字段名
         * @return {String}   字段值
         */
        getField: function (form, fieldName) {
            return BUI.FormHelper.serializeToObject(form)[fieldName];
        }
    },
    ValidateHelper: {
        /**
         * 是否为函数
         * @param  {*} fn 对象
         * @return {Boolean}  是否函数
         */
        isFunction: function (fn) {
            return typeof(fn) === 'function';
        },
        /**
         * 是否数组
         * @method
         * @param  {*}  obj 是否数组
         * @return {Boolean}  是否数组
         */
        isArray: function (value) {
            return Object.prototype.toString.call(value) === '[object Array]';
        },
        /**
         * 是否日期
         * @param  {*}  value 对象
         * @return {Boolean}  是否日期
         */
        isDate: function (value) {
            return Object.prototype.toString.call(value) === '[object Date]';
        },
        /**
         * 是否是javascript对象
         * @param {Object} value The value to test
         * @return {Boolean}
         * @method
         */
        //isObject: (toString.call(null) === '[object Object]') ?
        //    function (value) {
        //        // check ownerDocument here as well to exclude DOM nodes
        //        return value !== null && value !== undefined && toString.call(value) === '[object Object]' && value.ownerDocument === undefined;
        //    } :
        //    function (value) {
        //    return toString.call(value) === '[object Object]';
        //},
        /**
         * 是否是数字或者数字字符串
         * @param  {String}  value 数字字符串
         * @return {Boolean}  是否是数字或者数字字符串
         */
        isNumeric: function (value) {
            return !isNaN(parseFloat(value)) && isFinite(value);
        },
        /**
         * 判断是否数字，由于$.isNumberic方法会把 '123'认为数字
         * @return {Boolean} 是否数字
         */
        isNumber: function (value) {
            return typeof value === 'number';
        },
        isString: function (value) {
            return typeof value === 'string';
        },

        /**
         * 是否是布尔类型
         *
         * @param {Object} value 测试的值
         * @return {Boolean}
         */
        isBoolean: function (value) {
            return typeof value === 'boolean';
        }

    },
    ArrayHelper: {
        /**
         * 返回数组的最后一个对象
         * @param {Array} array 数组或者类似于数组的对象.
         * @return {*} 数组的最后一项.
         */
        peek: function (array) {
            return array[array.length - 1];
        },
        /**
         * 查找记录所在的位置
         * @param  {*} value 值
         * @param  {Array} array 数组或者类似于数组的对象
         * @param  {Number} [fromIndex=0] 起始项，默认为0
         * @return {Number} 位置，如果为 -1则不在数组内
         */
        indexOf: function (value, array, opt_fromIndex) {
            var fromIndex = opt_fromIndex == null ?
                0 : (opt_fromIndex < 0 ?
                Math.max(0, array.length + opt_fromIndex) : opt_fromIndex);

            for (var i = fromIndex; i < array.length; i++) {
                if (i in array && array[i] === value)
                    return i;
            }
            return -1;
        },
        /**
         * 数组是否存在指定值
         * @param  {*} value 值
         * @param  {Array} array 数组或者类似于数组的对象
         * @return {Boolean} 是否存在于数组中
         */
        contains: function (value, array) {
            return $.Helper.ArrayHelper.indexOf(value, array) >= 0;
        },

        /**
         * 2个数组内部的值是否相等
         * @param  {Array} a1 数组1
         * @param  {Array} a2 数组2
         * @return {Boolean} 2个数组相等或者内部元素是否相等
         */
        equals: function (a1, a2) {
            if (a1 == a2) {
                return true;
            }
            if (!a1 || !a2) {
                return false;
            }

            if (a1.length != a2.length) {
                return false;
            }
            var rst = true;
            for (var i = 0; i < a1.length; i++) {
                if (a1[i] !== a2[i]) {
                    rst = false;
                    break;
                }
            }
            return rst;
        },

        /**
         * 过滤数组
         * @param {Object|Array} element/Object 数组中的元素或者对象的值
         * @param {Function} func 遍历的函数 function(elememt,index){} 或者 function(value,key){},如果返回true则添加到结果集
         * @return {Array} 过滤的结果集
         */
        filter: function (array, func) {
            var result = [];
            $.each(array, function (value, index) {
                if (func(value, index)) {
                    result.push(value);
                }
            });
            return result;
        },
        /**
         * 转换数组数组
         * @param {Object|Array} element/Object 数组中的元素或者对象的值
         * @param {Function} func 遍历的函数 function(elememt,index){} 或者 function(value,key){},将返回的结果添加到结果集
         * @return {Array} 过滤的结果集
         */
        map: function (array, func) {
            var result = [];
            $.each(array, function (value, index) {
                result.push(func(value, index));
            });
            return result;
        },
        /**
         * 获取第一个符合条件的数据
         * @param  {Array} array 数组
         * @param  {Function} func  匹配函数
         * @return {*}  符合条件的数据
         */
        find: function (array, func) {
            var i = $.Helper.ArrayHelper.findIndex(array, func);
            return i < 0 ? null : array[i];
        },
        /**
         * 获取第一个符合条件的数据的索引值
         * @param  {Array} array 数组
         * @param  {Function} func  匹配函数
         * @return {Number} 符合条件的数据的索引值
         */
        findIndex: function (array, func) {
            var result = -1;
            $.each(array, function (value, index) {
                if (func(value, index)) {
                    result = index;
                    return false;
                }
            });
            return result;
        },
        /**
         * 数组是否为空
         * @param  {Array}  array 数组
         * @return {Boolean}  是否为空
         */
        isEmpty: function (array) {
            return array.length == 0;
        },
        /**
         * 插入数组
         * @param  {Array} array 数组
         * @param  {Number} index 位置
         * @param {*} value 插入的数据
         */
        add: function (array, value) {
            array.push(value);
        },
        /**
         * 将数据插入数组指定的位置
         * @param  {Array} array 数组
         * @param {*} value 插入的数据
         * @param  {Number} index 位置
         */
        addAt: function (array, value, index) {
            $.Helper.ArrayHelper.splice(array, index, 0, value);
        },
        /**
         * 清空数组
         * @param  {Array} array 数组
         * @return {Array}  清空后的数组
         */
        empty: function (array) {
            if (!(array instanceof (Array))) {
                for (var i = array.length - 1; i >= 0; i--) {
                    delete array[i];
                }
            }
            array.length = 0;
        },
        /**
         * 移除记录
         * @param  {Array} array 数组
         * @param  {*} value 记录
         * @return {Boolean}   是否移除成功
         */
        remove: function (array, value) {
            var i = $.Helper.ArrayHelper.indexOf(value, array);
            var rv;
            if ((rv = i >= 0)) {
                $.Helper.ArrayHelper.removeAt(array, i);
            }
            return rv;
        },
        /**
         * 移除指定位置的记录
         * @param  {Array} array 数组
         * @param  {Number} index 索引值
         * @return {Boolean}   是否移除成功
         */
        removeAt: function (array, index) {
            return $.Helper.ArrayHelper.splice(array, index, 1).length == 1;
        },
        /**
         * @private
         */
        slice: function (arr, start, opt_end) {
            if (arguments.length <= 2) {
                return Array.prototype.slice.call(arr, start);
            } else {
                return Array.prototype.slice.call(arr, start, opt_end);
            }
        },
        /**
         * @private
         */
        splice: function (arr, index, howMany, var_args) {
            return Array.prototype.splice.apply(arr, $.Helper.ArrayHelper.slice(arguments, 1))
        }
    }

}


//var win = window,
//    doc = document,
//    objectPrototype = Object.prototype,
//    toString = objectPrototype.toString;


